Metrics

Complexity Report

Findings

Total: 6,496

complexity: 639

ComplexCondition: 39 Complex conditions should be simplified and extracted into well-named methods if necessary.
ComplexMethod: 55 Prefer splitting up complex methods into smaller, easier to understand methods.
LargeClass: 1 One class should have one responsibility. Large classes tend to handle many things at once. Split up large classes into smaller classes that are easier to understand.
LongMethod: 46 One method should have one responsibility. Long methods tend to handle many things at once. Prefer smaller methods to make them easier to understand.
LongParameterList: 152 The more parameters a function has the more complex it is. Long parameter lists are often used to control complex algorithms and violate the Single Responsibility Principle. Prefer functions with short parameter lists.
NestedBlockDepth: 82 Excessive nesting leads to hidden complexity. Prefer extracting code to make it easier to understand.
TooManyFunctions: 264 Too many functions inside a/an file/class/object/interface always indicate a violation of the single responsibility principle. Maybe the file/class/object/interface wants to manage too many things at once. Extract functionality which clearly belongs together.

empty-blocks: 240

EmptyCatchBlock: 7 Empty catch block detected. Empty catch blocks indicate that an exception is ignored and not handled.
EmptyClassBlock: 11 Empty block of code detected. As they serve no purpose they should be removed.
EmptyDefaultConstructor: 10 Empty block of code detected. As they serve no purpose they should be removed.
EmptyElseBlock: 8 Empty block of code detected. As they serve no purpose they should be removed.
EmptyFunctionBlock: 192 Empty block of code detected. As they serve no purpose they should be removed.
EmptyKtFile: 4 Empty block of code detected. As they serve no purpose they should be removed.
EmptySecondaryConstructor: 8 Empty block of code detected. As they serve no purpose they should be removed.

exceptions: 311

PrintStackTrace: 8 Do not print a stack trace. These debug statements should be removed or replaced with a logger.
RethrowCaughtException: 2 Do not rethrow a caught exception of the same type.
SwallowedException: 56 The caught exception is swallowed. The original exception could be lost.
TooGenericExceptionCaught: 170 The caught exception is too generic. Prefer catching specific exceptions to the case that is currently handled.
TooGenericExceptionThrown: 75 The thrown exception is too generic. Prefer throwing project specific exceptions to handle error cases.

naming: 130

ClassNaming: 7 A class or object name should fit the naming pattern defined in the projects configuration.
ConstructorParameterNaming: 20 Constructor parameter names should follow the naming convention set in the projects configuration.
FunctionParameterNaming: 2 Function parameter names should follow the naming convention set in the projects configuration.
MatchingDeclarationName: 15 If a source file contains only a single non-private top-level class or object, the file name should reflect the case-sensitive name plus the .kt extension.
MemberNameEqualsClassName: 3 A member should not be given the same name as its parent class or object.
PackageNaming: 43 Package names should match the naming convention set in the configuration.
TopLevelPropertyNaming: 4 Top level property names should follow the naming convention set in the projects configuration.
VariableNaming: 36 Variable names should follow the naming convention set in the projects configuration.

performance: 12

ArrayPrimitive: 1 Using `Array<Primitive>` leads to implicit boxing and a performance hit.
SpreadOperator: 11 In most cases using a spread operator causes a full copy of the array to be created before calling a method. This may result in a performance penalty.

potential-bugs: 18

EqualsAlwaysReturnsTrueOrFalse: 2 Having an `equals()` method that always returns true or false is not a good idea. It does not follow the contract of this method. Consider a good default implementation (e.g. `this == other`).
EqualsWithHashCodeExist: 2 Always override hashCode when you override equals. All hash-based collections depend on objects meeting the equals-contract. Two equal objects must produce the same hashcode. When inheriting equals or hashcode, override the inherited and call the super method for clarification.
ImplicitDefaultLocale: 14 Implicit default locale used for string processing. Consider using explicit locale.

style: 5,146

ForbiddenComment: 65 Flags a forbidden comment.
FunctionOnlyReturningConstant: 2 A function that only returns a constant is misleading. Consider declaring a constant instead.
LoopWithTooManyJumpStatements: 5 The loop contains more than one break or continue statement. The code should be refactored to increase readability.
MagicNumber: 546 Report magic numbers. Magic number is a numeric literal that is not defined as a constant and hence it's unclear what the purpose of this number is. It's better to declare such numbers as constants and give them a proper name. By default, -1, 0, 1, and 2 are not considered to be magic numbers.
MaxLineLength: 2,478 Line detected, which is longer than the defined maximum line length in the code style.
MayBeConst: 124 Usage of `vals` that can be `const val` detected.
ModifierOrder: 1 Modifier order should be: protected open
NewLineAtEndOfFile: 1,570 Checks whether files end with a line separator.
ProtectedMemberInFinalClass: 7 Member with protected visibility in final class is private. Consider using private or internal as modifier.
ReturnCount: 60 Restrict the number of return statements in methods.
SerialVersionUIDInSerializableClass: 107 A class which implements the Serializable interface does not define a correct serialVersionUID field. The serialVersionUID field should be a constant long value inside a companion object.
ThrowsCount: 1 Restrict the number of throw statements in methods.
UnnecessaryAbstractClass: 7 An abstract class is unnecessary and can be refactored. An abstract class should have both abstract and concrete properties or functions. An abstract class without a concrete member can be refactored to an interface. An abstract class without an abstract member can be refactored to a concrete class.
UnusedPrivateClass: 2 Private class is unused and should be removed.
UnusedPrivateMember: 142 Private member is unused and should be removed.
UtilityClassWithPublicConstructor: 9 The class declaration is unnecessary because it only contains utility functions. An object declaration should be used instead.
WildcardImport: 20 Wildcard imports should be replaced with imports using fully qualified class names. Wildcard imports can lead to naming conflicts. A library update can introduce naming clashes with your classes which results in compilation errors.
generated with detekt version 1.20.0 on 2022-06-23 20:29:14 UTC.